package com.industry.framework.core.generic.record;

import com.industry.framework.core.wrapper.UpdateWrapper;
import org.apache.ibatis.executor.BatchResult;

import java.util.List;

/**
 * @Author nbZhuozh
 * @Date 2025-03-25  09:20
 **/
public interface Record<T> {

    public final static String INSERT = "新建";
    public final static String UPLOAD = "上传附件";
    public final static String UPDATE = "修改";
    public final static String REMARK = "备注";

    //判断是否为缓存业务数据
    default boolean activeRecordBiz(Class<?> clz){
        return RecordBuilder.hasTargetOperationRecod(clz);
    }

    public void markRecordTypeUpdate(T source , BatchResult result , UpdateWrapper.UpWrapperTemplate wrapper);

    public void markRecordTypeUpdate(String bizId, UpdateWrapper.UpWrapperTemplate wrapper);

    public void markRecordTypeUpdate(String id, String[] updateFields  , String[] oldVal , String[] newVal );
}
